Contemporary graphics processing systems are commonly arranged in a pipelined fashion, in which specialised tasks are carried out by sequential elements of the pipeline. For example, it is known for a graphics processing apparatus to receive its input in the form of basic components known as graphics primitives, usually in the form of simple polygons, such as triangles. At a very general level, these graphics primitives are then passed through two main processing stages, namely a rasterization stage and a rendering stage (with which the skilled person is familiar and are therefore not described in detail here). The rasterization stage results in graphics fragments, each graphic fragment representing a limited number of sampling points used to represent the graphics primitive from which that graphics fragment derives. The subsequent rendering process then determines the display characteristics for each graphics fragment, for example its colour and relative transparency. Following the rendering process, the rendered graphic fragments are output for display, for example, via accumulation in a display buffer.
A known part of such a graphics processing pipeline is “depth testing”, wherein a selected graphics fragment is examined to determine if it would be obscured by at least one other graphics fragment in the final display. Since it is clearly only necessary to display those graphics fragments which will be (at least partially) visible to the viewer of the display, any graphics fragments which are determined to be fully obscured can be eliminated from the graphics processing.
Such depth testing is often configured to take place after the rendering stage because it is often only at that point in the graphics pipeline that it can be finally determined if a given graphics fragment will be obscured, due to certain display characteristics (such as transparency) only becoming available after the rendering stage. This may not only be due to the required information not being available for that graphics fragment itself, but can also be because the required information for another graphics fragment at the same display location not yet being available. It is however advantageous to perform the depth testing as early in the graphics processing pipeline as possible, because of the opportunity it provides to avoid unnecessary processing of graphics fragments which will ultimately not be displayed. In particular, a great deal of the processing which must be carried out for the graphics fragments takes place at the rendering stage (also known as the shader pipeline) and it would therefore be preferable to perform depth testing before entering the shade of pipeline.
Such “early” depth testing is therefore sometimes performed, however it is limited to those cases where the required information is already available.
Some background information relating to (early) depth testing can be found in the commonly assigned U.S. patent application Ser. No. 13/907,550, the entire contents of which are incorporated herein by reference.
Nevertheless, given the intensity of processing carried out for each graphics fragment in the shader pipeline, it would be desirable to improve the opportunities to perform early depth testing.